//
//  EFAProjectTCell.m
//  efairy
//
//  Created by XiangDongMBP on 2017/8/8.
//  Copyright © 2017年 East. All rights reserved.
//

#import "EFAProjectTCell.h"
#import "EFAModel.h"

@implementation EFAProjectTCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configViewWithPjtItem:(EFAPjtListItem *)item {
    self.titleLabel.text = item.efairyproject_name;
    NSString *deviceCnt = [NSString stringWithFormat:@" %ld/%ld", (long)item.efairyproject_device_online_number, (long)item.efairyproject_total_devices];
    [self.deviceBtn setTitle:deviceCnt forState:UIControlStateNormal];
    NSString *userCnt = [NSString stringWithFormat:@" %ld", (long)(item.efairyproject_total_users + item.efairyproject_total_gms)];
    [self.peopleBtn setTitle:userCnt forState:UIControlStateNormal];
    self.subTitleLabel.text = item.efairyproject_address;
}

@end
